Project 3: Photometric Stereo
Tuo Wang
1. Goal:
Implement a system to construct a height field from a series of images of a diffuse object under different point light sources.
2. Methodology
a) Camera calibration
b) Solving for normals and albedo
c) Least square surface fitting
3. How to Run
Run the ¡°Main_PhotometricStereo.m¡± file to get the result. Using the command ¡®dataname= sprint('psmImages/owl/owl.%d.ppm',i)¡¯ and ¡®mask=imread('psmImages/owl/owl.mask.ppm')¡¯ to designate input images.
Function explanation:
getCenter.m: computing the center of the ball
getRadius.m: computing the radius of the ball
getDirection: computing the light direction
solveNormalandAlbedo.m: caculating the normals and albedo, and ploting the RGB-normal map and albedo map
getDepth: least square surface fitting
4. Result
Albedo map:
RGB-normal map:
Recovered surfaces in 2 views:
5. Favorite Result
Cat: